Add AI agent onboarding and Copilot coding agent configuration#344
Add AI agent onboarding and Copilot coding agent configuration#344
Conversation
Provides agents with project overview, build/test/lint commands, repository layout, CI checks, and coding conventions so they can work efficiently without repeated codebase exploration. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@dd32 This repo feels like a good candidate to experiment with Github's autonomous agents to go through the backlog of (I assume low-to-medium priority) issues, curious what you think? I'd probably add a layer of copilot-specific instructions to respond to assigned issues and enable MCP access to Playwright or Puppeteer or something so it can spin up wp-env and test its changes. |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@obenland Sounds like a sane choice to me. I'm not 100% that all of the backlog are things we want to do, which is why I mostly haven't just let AI loose on many things. I hadn't yet dug into directing copilot, and I didn't realise it had Playwright available to it (I assumed I'd have to install it into the env), I guess when I've used it I haven't properly prompted CoPilot to use wp-env properly, so it had no ability to use playwright anyway.. Partly due to the complexity of the bootup process for the local environments... |
Yeah, agreed. If you find the time, maybe you could close some of the obvious-to-you
This is mainly what the experiment would be about for me. Can we setup copilot through MCPs and agent instructions to where it can act on issues independently. And as a secondary thought, can it be replicated for other ( |
|
Could I ask for your help giving me access to the settings necessary to enabled MCPs for this repo? |
|
@obenland I've bumped Meta team (which still includes you) from Maintain to Admin on this repo though. |
|
Thanks! The setting is within the "Code and automation" group under Copilot > Copilot coding agent, at the bottom of the page. I added Playwright, will experiment with copilot instructions next |
Adds instructions and environment setup so GitHub Copilot coding agents can work on issues end-to-end: understand the codebase and its history, write fixes with tests, and validate changes using Playwright and wp-env. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds AI-agent onboarding documentation and GitHub Copilot-specific instruction/config files to reduce repeated repository exploration and standardize local/CI setup expectations.
Changes:
- Add
AGENTS.mdandCLAUDE.mdfor AI agent onboarding and cross-referencing. - Add GitHub Copilot instruction files under
.github/instructions/plus.github/copilot-instructions.md. - Add a
copilot-setup-stepsGitHub Actions workflow and ignore.claude/settings.local.json.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
CLAUDE.md |
Adds a reference to AGENTS.md for Claude-based agents. |
AGENTS.md |
Introduces a consolidated project overview, repo layout, commands, CI, and conventions. |
.gitignore |
Ignores local Claude settings file. |
.github/workflows/copilot-setup-steps.yml |
Adds an opt-in workflow to stand up wp-env and run tests/lint. |
.github/instructions/tests.instructions.md |
Adds testing guidance for changes under tests/**. |
.github/instructions/php.instructions.md |
Adds PHP conventions guidance for **/*.php. |
.github/instructions/js.instructions.md |
Adds JS/React conventions guidance for settings/**/*.{js,jsx,ts,tsx}. |
.github/copilot-instructions.md |
Adds broader Copilot agent guidance on architecture, security, and validation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The push/pull_request path triggers cause unnecessary CI runs whenever the workflow file is changed in a PR. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Cache node_modules, Playwright browsers, and Docker images to avoid re-downloading everything on each agent run. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove reference to nonexistent .editorconfig, align codeCoverageIgnore guidance with phpunit.xml.dist philosophy, and correct mu-plugin label to network-activated plugin. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…files Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Only cache images from wp-env containers instead of all local images, and use nullglob to prevent errors when loading from an empty cache. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Drop the ambiguous PHPDoc/covers bullet from PHP instructions. Pin Playwright version in copilot setup for reproducible builds. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Playwright is provided by the MCP server, not used as a direct dependency. No need to install browsers in the setup workflow. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@dd32 Are you up for me giving this a try? |
Yeah I read this as "Playwright MCP is already enabled"; Rendering there to be no need to add it as a Mcpserver 🤷
|
|
Oh, I think you're right! Didn't catch that |
|
Test session with the agent.md and copilot instructions: https://github.com/WordPress/wporg-two-factor/tasks/2be2a4ed-b0ae-4246-9d4c-ef2dd0a7e70d |
Use GitHub repo refs instead of zip downloads for plugins (Gutenberg, bbPress, WebAuthn provider) to speed up environment setup in CI. The copilot setup workflow and instructions now use --config=.wp-env.copilot.json. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nfig Move GitHub repo refs for plugins and core into the shared .wp-env.json instead of maintaining a separate copilot-specific config. Simplifies all wp-env commands by removing --config flags everywhere. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…n GitHub refs in PR #344 Agent-Logs-Url: https://github.com/WordPress/wporg-two-factor/sessions/76d8b648-031c-4444-8535-48498a512de1 Co-authored-by: obenland <1398304+obenland@users.noreply.github.com>
wp-env validates config strictly and rejects unknown keys. Document the GitHub repo ref requirement in copilot-instructions.md instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The repo is bbpress/bbPress, not WordPress/bbpress. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The sjinks/wp-two-factor-provider-webauthn GitHub repo requires composer install for its vendor/autoload.php. The zip download from wordpress.org includes built dependencies and works out of the box. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The WebAuthn provider GitHub source needs composer install, so use the pre-built release zip from GitHub instead. Remove the explicit WordPress core ref — wp-env's default core download is much faster than cloning WordPress/WordPress with all its branches. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot agents can't download from api.wordpress.org. Use the GitHub archive zip which is fast (~97s vs ~17min for git clone) and available inside the Copilot sandbox. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
AGENTS.mdwith project overview, build/test/lint commands, repository layout, CI workflow details, and coding conventionsCLAUDE.mdthat referencesAGENTS.md.github/copilot-instructions.mdwith full autonomous workflow instructions: reading issues, understanding code history, writing secure code with tests, and validating with Playwright + wp-env.github/workflows/copilot-setup-steps.ymlto set up the agent environment (Node 24, PHP 8.3, Composer, Playwright, wp-env).github/instructions/Test plan
AGENTS.mdcontent is accurate and up to datecopilot-instructions.mdcovers the right workflows and URLscopilot-setup-steps.ymlruns successfully (trigger via workflow_dispatch)🤖 Generated with Claude Code